package com.jack.lib.core.ext

import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import androidx.annotation.ColorInt
import androidx.annotation.IdRes
import androidx.annotation.StringRes
import com.blankj.utilcode.util.ColorUtils
import com.blankj.utilcode.util.ResourceUtils
import com.blankj.utilcode.util.StringUtils

/**
 * author : chong.huang
 * create : 2022/1/3
 * desc   :
 */

inline val @receiver:ColorInt Int.color get() = ColorUtils.getColor(this)

inline val @receiver:StringRes Int.string get() = StringUtils.getString(this)

inline val @receiver:IdRes Int.drawable: Drawable get() = ResourceUtils.getDrawable(this)

inline val @receiver:ColorInt Int.drawableColor: ColorDrawable get() = ColorDrawable(this)